<%-- 
    Document   : headerMainPage
    Created on : Nov 17, 2012, 8:07:29 PM
    Author     : minhtrungn
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="/WEB-INF/source.jsp" %>


<div class="header-block">
    <div class="login-block-wrapper">
        <div class="login-block">
            <form method="post" action="LoginServlet" onsubmit="return validateLogin()">
                <%@page language="java" %>
                <%String user = (String) session.getAttribute("USER");
                            String role = (String) session.getAttribute("ROLE");
                            session.getAttribute("FULLNAME");
                            if (user != null) {%>
                <div>
                    <a style="text-decoration: none; padding: 10px 0px 10px 10px; color: #2F4F4F;font-weight: bold;" href="Controller?btnAction=orderList"><img src="Pictures/Icons/orderList.png" title="Danh sách đơn hàng" border="0"></a>
                    <a style="text-decoration: none; padding: 10px 0px 10px 0px; color: #2F4F4F;font-weight: bold;" href="Controller?btnAction=shoppingCart"><img src="Pictures/Icons/cart.png" title="Giỏ hàng" border="0"></a><font id="count" style="color:red; font-weight: bold;">0</font> |
                        <%if (!role.equals("Admin")) {%>
                    <font color="#000066">Welcome</font>
                    <font color="orange" style="font-weight: bold;"><b> ${sessionScope.FULLNAME}</b></font>
                    <%}%>
                    <%if (role.equals("Admin")) {%>
                    <font color="#000066">Welcome</font>
                    <font color="#FF0000" style="font-weight: bold;"><b> ${sessionScope.FULLNAME}</b></font>
                    <%}%>
                    | <a href="Controller?btnAction=logout" style="font-weight: bold;color: #000066; text-decoration: none">Đăng xuất</a> |
                    <input type="hidden" id="user-account" value="${sessionScope.USER}"/>
                    <a href="Controller?btnAction=accountDetail" style="font-weight: bold;color: #000066; text-decoration: none">Thông tin tài khoản</a>

                </div>
                <%} else {%>
                <a style="text-decoration: none; padding-right: 0px; color: #2F4F4F;font-weight: bold" href="Controller?btnAction=shoppingCart"><img src="Pictures/Icons/cart.png" title="Giỏ hàng" border="0"></a><font id="count" style="color:red; font-weight: bold;">0</font> |
                <input class="user" id="username" type="text" name="txtUsername" value="" maxlength="16" placeholder=" Tài khoản">
                <input class="pass" id="password" type="password" name="txtPassword" value="" maxlength="16" placeholder=" Mật khẩu">
                <button class="login-btn" type="submit" name="btnAction" value="login">Đăng nhập</button>|
                <a class="regist-btn" href="Controller?btnAction=register" ><span>Đăng kí</span></a><br/>
                <font id="loginError" style="color: #FF0000; font-weight: bold">${requestScope.loginError}</font>
                <%}%>
            </form>
        </div>
    </div>
    <div class="name-wrapper">
        <!--        <div class="name">
                    <p></p>
                    <a href="Controller?btnAction=home" title="Funny Fashion">
                        <img src="Pictures/Icons/logoFS.jpg"/>
                    </a>
                </div>-->
        <div class="name" align="center">
            <p></p>
            <a style="text-decoration: none;" href="Controller?btnAction=home" title="Funny Fashion">
                Funny Fashion
                <p class="slogan">Phong cách thời trang của bạn</p>

            </a>
        </div>

    </div>

    <div class="menu-wrapper">
        <ul class="menu-tab">
            <%String curr = (String) session.getAttribute("currPage");
                        if (curr == null) {
                            curr = "home";
                        }
                        if (curr.equals("4man")) {%>

            <li class="menu-tab-func visited" id="4man" onmouseover="showListman()" onmouseout="hideList()"><a href="Controller?btnAction=search&paramFilter=4man"><span> Thời trang Nam </span></a>
                <ul class="menu-tab-func-ul" id="4manul" style="display: none;">
                    <li ><a href="Controller?btnAction=search&paramFilter=1" ><span>Áo khoác Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=3" ><span>Áo sơ mi Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=5" ><span>Áo thun Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=14" ><span>Giầy dép Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=7" ><span>Quần jean Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=9" ><span>Quần kaki Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=12" ><span>Quần Tây Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=11" ><span>Quần sooc Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=16" ><span>Túi xách Nam</span></a></li>
                </ul>
            </li>
            <%} else {%>
            <li class="menu-tab-func" id="4man" onmouseover="showListman()" onmouseout="hideList()"><a href="Controller?btnAction=search&paramFilter=4man"><span> Thời trang Nam </span></a>
                <ul class="menu-tab-func-ul" id="4manul" style="display: none;">
                    <li ><a href="Controller?btnAction=search&paramFilter=1" ><span>Áo khoác Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=3" ><span>Áo sơ mi Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=5" ><span>Áo thun Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=14" ><span>Giầy dép Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=7" ><span>Quần jean Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=9" ><span>Quần kaki Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=12" ><span>Quần Tây Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=11" ><span>Quần sooc Nam</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=16" ><span>Túi xách Nam</span></a></li>
                </ul>
            </li>
            <%}%>
            <%if (curr.equals("4woman")) {%>
            <li class="menu-tab-func visited" id="4woman" onmouseover="showListwoman()" onmouseout="hideList()"><a href="Controller?btnAction=search&paramFilter=4woman"><span> Thời trang Nữ </span></a>
                <ul class="menu-tab-func-ul" id="4womanul" style="display: none;">
                    <li ><a href="Controller?btnAction=search&paramFilter=2" ><span>Áo khoác Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=4" ><span>Áo sơ mi Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=6" ><span>Áo thun Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=15" ><span>Giầy dép Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=8" ><span>Quần jean Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=10" ><span>Quần kaki Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=13" ><span>Quần Tây Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=18" ><span>Váy Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=17" ><span>Túi xách Nữ</span></a></li>
                </ul>
            </li>
            <%} else {%>
            <li class="menu-tab-func" id="4woman" onmouseover="showListwoman()" onmouseout="hideList()"><a href="Controller?btnAction=search&paramFilter=4woman"><span> Thời trang Nữ </span></a>
                <ul class="menu-tab-func-ul" id="4womanul" style="display: none;">
                    <li ><a href="Controller?btnAction=search&paramFilter=2" ><span>Áo khoác Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=4" ><span>Áo sơ mi Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=6" ><span>Áo thun Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=15" ><span>Giầy dép Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=8" ><span>Quần jean Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=10" ><span>Quần kaki Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=13" ><span>Quần Tây Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=18" ><span>Váy Nữ</span></a></li>
                    <li ><a href="Controller?btnAction=search&paramFilter=17" ><span>Túi xách Nữ</span></a></li>
                </ul>
            </li>
            <%}%>
            <%if (curr.equals("about")) {%>
            <li class="menu-tab-func visited" id="about"><a href="Controller?btnAction=about"><span>Liên hệ</span></a></li>
            <%} else {%>
            <li class="menu-tab-func" id="about"><a href="Controller?btnAction=about"><span>Liên hệ</span></a></li>
            <%}%>
        </ul>
        <div class="search-wrapper">
            <div class="search">
                <form method="POST" action="Controller">
                    <input class="input-search" id="search" type="text" name="txtSearch"  value="${param.txtSearch}" placeholder=" Tìm kiếm...">
                    <input type="hidden" name="paramFilter" value="search"/>
                    <button class="btn-search" type="submit" name="btnAction" value="search">Tìm
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>
